{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "spectacular-lindsay",
   "metadata": {},
   "source": [
    "# 探索数据"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "joined-fiber",
   "metadata": {},
   "source": [
    "## 加载数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "informal-diameter",
   "metadata": {},
   "outputs": [],
   "source": [
    "##keep\n",
    "import numpy as np\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "unavailable-foundation",
   "metadata": {},
   "outputs": [],
   "source": [
    "##keep\n",
    "housing = pd.read_csv('../datasets/housing.csv')\n",
    "housing.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "considerable-mediterranean",
   "metadata": {},
   "source": [
    "## 查看属性的非空值数量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ranging-comedy",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "handed-princess",
   "metadata": {},
   "source": [
    "## 绘制每个属性的直方图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bound-bolivia",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "confidential-serve",
   "metadata": {},
   "source": [
    "## 根据median_income来分组\n",
    "根据收入分为5个类别（用1-5来做标签），0-1.5是类别1，1.5-3是类别2，以此类推。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "forward-aerospace",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "atomic-permit",
   "metadata": {},
   "source": [
    "## 对新变量分组统计"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "narrative-briefing",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "structural-minutes",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "organized-routine",
   "metadata": {},
   "source": [
    "## 利用新变量进行分层抽样"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "powered-version",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "adjustable-danger",
   "metadata": {},
   "source": [
    "## 查看分层抽样测试集中各类别的比例"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "operating-terrorism",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "retained-chain",
   "metadata": {},
   "source": [
    "## 查看原数据集中各类别的比例"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "chronic-albuquerque",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
